package com.titar.robot.db;

import com.titar.robot.entity.CacheTableData;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

@Dao
public interface CacheTableDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(CacheTableData cacheTableMetaData);

    @Query("SELECT * FROM cache_data_table WHERE `key`=:k")
    LiveData<CacheTableData> get(String k);

    @Delete
    void delet(CacheTableData cacheTableMetaData);
}
